package com.bingo.mpa.pojo;

import java.sql.Timestamp;
import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;
import org.express.portal.persist.POJO;

public class Order extends POJO
{
	private static final long serialVersionUID = 1L;
	private long oid;
	private long aid;
	private long sid;
	private String s_account;
	private byte carrier;
	private byte brand;	//品牌
	private byte card_type;//卡类别，区分新1卡，新2卡
	private String phone;
	private int package_;
	private byte tariff_type;
	private int retail;
	private int discount;
	private int prestore;
	private String province;
	private String city;
	private byte status;
	private String account_name;
	private String id_number;
	private String id_address;
	private Timestamp id_exp_date;
	private String tel;	
	private String c_address;
	private String id_card;
	private String iccid;
	private Timestamp order_time;	
	private String p_account;
	private Timestamp proce_time;
	private String remark;
	//2013-12-08增加支付相关字段
	private byte pay_status;
	private String pay_remark;
	private String pay_id;
	
	public Order()
	{
		super._this_table_name = "P_ORDER";
		this.status = 1;
		this.pay_status = 1;
	}
	public long getOid()
	{
		return oid;
	}
	public void setOid(long oid)
	{
		this.oid = oid;
	}
	public long getAid()
	{
		return aid;
	}
	public void setAid(long aid)
	{
		this.aid = aid;
	}
	public long getSid()
	{
		return sid;
	}
	public void setSid(long sid)
	{
		this.sid = sid;
	}
	public String getS_account()
	{
		return s_account;
	}
	public void setS_account(String s_account)
	{
		this.s_account = s_account;
	}
	public byte getCarrier()
	{
		return carrier;
	}
	public void setCarrier(byte carrier)
	{
		this.carrier = carrier;
	}
	public byte getBrand()
	{
		return brand;
	}
	public void setBrand(byte brand)
	{
		this.brand = brand;
	}
	public byte getCard_type()
	{
		return card_type;
	}
	public void setCard_type(byte card_type)
	{
		this.card_type = card_type;
	}
	public String getPhone()
	{
		return phone;
	}
	public void setPhone(String phone)
	{
		this.phone = phone;
	}
	public int getPackage_()
	{
		return package_;
	}
	public void setPackage_(int package_)
	{
		this.package_ = package_;
	}
	public byte getTariff_type()
	{
		return tariff_type;
	}
	public void setTariff_type(byte tariff_type)
	{
		this.tariff_type = tariff_type;
	}
	public int getRetail()
	{
		return retail;
	}
	public void setRetail(int retail)
	{
		this.retail = retail;
	}
	public int getDiscount()
	{
		return discount;
	}
	public void setDiscount(int discount)
	{
		this.discount = discount;
	}
	public int getPrestore()
	{
		return prestore;
	}
	public void setPrestore(int prestore)
	{
		this.prestore = prestore;
	}
	public String getProvince()
	{
		return province;
	}
	public void setProvince(String province)
	{
		this.province = province;
	}
	public String getCity()
	{
		return city;
	}
	public void setCity(String city)
	{
		this.city = city;
	}
	public byte getStatus()
	{
		return status;
	}
	public void setStatus(byte status)
	{
		this.status = status;
	}
	public String getAccount_name()
	{
		return account_name;
	}
	public void setAccount_name(String account_name)
	{
		this.account_name = account_name;
	}
	public String getId_number()
	{
		return id_number;
	}
	public void setId_number(String id_number)
	{
		this.id_number = id_number;
	}
	public String getId_address()
	{
		return id_address;
	}
	public void setId_address(String id_address)
	{
		this.id_address = id_address;
	}
	public String getId_card()
	{
		return id_card;
	}
	public void setId_card(String id_card)
	{
		this.id_card = id_card;
	}
	public String getIccid()
	{
		return iccid;
	}
	public void setIccid(String iccid)
	{
		this.iccid = iccid;
	}
	public Timestamp getId_exp_date()
	{
		return id_exp_date;
	}
	public void setId_exp_date(Timestamp id_exp_date)
	{
		this.id_exp_date = id_exp_date;
	}
	public String getTel()
	{
		return tel;
	}
	public void setTel(String tel)
	{
		this.tel = tel;
	}
	public String getC_address()
	{
		return c_address;
	}
	public void setC_address(String c_address)
	{
		this.c_address = c_address;
	}
	public Timestamp getOrder_time()
	{
		return order_time;
	}
	public void setOrder_time(Timestamp order_time)
	{
		this.order_time = order_time;
	}
	public String getP_account()
	{
		return p_account;
	}
	public void setP_account(String p_account)
	{
		this.p_account = p_account;
	}
	public Timestamp getProce_time()
	{
		return proce_time;
	}
	public void setProce_time(Timestamp proce_time)
	{
		this.proce_time = proce_time;
	}
	public String getRemark()
	{
		return remark;
	}
	public void setRemark(String remark)
	{
		this.remark = remark;
	}
	public byte getPay_status()
	{
		return pay_status;
	}
	public void setPay_status(byte pay_status)
	{
		this.pay_status = pay_status;
	}
	public String getPay_remark()
	{
		return pay_remark;
	}
	public void setPay_remark(String pay_remark)
	{
		this.pay_remark = pay_remark;
	}
	public String getPay_id()
	{
		return pay_id;
	}
	public void setPay_id(String pay_id)
	{
		this.pay_id = pay_id;
	}
	@SuppressWarnings("unchecked")
	protected Map<String, Object> listInsertableFields()
	{
		try
		{
			Map<String, Object> props = BeanUtils.describe(this);
			if (getId() <= 0)
			{
				if(props.containsKey("id"))
				{
					props.remove("id");
				}
				if(props.containsKey("oid"))
				{
					props.remove("oid");
				}
			}
			props.remove("class");
			return props;
		}
		catch (Exception e)
		{
			throw new RuntimeException("Exception when Fetching fields of " + this);
		}
	}
}
